let $axios = require('axios')
$axios.defaults.baseURL = 'http://localhost:8090/api'

//单据进货表接口
export function loadReceiptDetail(params){
  return new Promise((resolve, reject) => {
    $axios.post(`/receipt/receiptDetail?receipt_no=${params}`).then(resp=>{
      if(resp&&resp.status==200){
        resolve(resp);
      }
      reject(resp);
    })
  })
}
//单据基本信息接口
export function  loadReceiptInfo(params){
  return new Promise((resolve, reject) => {
    $axios.post(`/receipt/info?receipt_no=${params}`).then(resp=>{
      if(resp&&resp.status==200){
        resolve(resp);
      }
      reject(resp);
    })
  })
}
